enhance garmin route writes for devices using D201_Rte_Hdr_Type. (#1297)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Fri, 19 Jul 2024 12:52:44 +0000 (06:52 -0600)
committerGitHub <noreply@github.com>
Fri, 19 Jul 2024 12:52:44 +0000 (06:52 -0600)
which use GPS_PWay->rte_cmnt for the route name.

garmin.cc

index 732f12b09622d433b94c43ed1f6a6770676a46a2..9ffb56d5ce1902aca368b3ac15d5723fb1e3426c 100644 (file)
--- a/garmin.cc
+++ b/garmin.cc
@@ -907,6 +907,11 @@ GarminFormat::route_hdr_pr(const route_head* rte)
   (*cur_tx_routelist_entry)->rte_num = rte->rte_num;
   (*cur_tx_routelist_entry)->isrte = 1;
   if (!rte->rte_name.isEmpty()) {
+    /* for devices that use D201_Rte_Hdr_Type */
+    write_char_string((*cur_tx_routelist_entry)->rte_cmnt,
+                      str_from_unicode(rte->rte_name).constData(),
+                      sizeof((*cur_tx_routelist_entry)->rte_cmnt));
+    /* for devices that use D202_Rte_Hdr_Type */
     write_char_string((*cur_tx_routelist_entry)->rte_ident,
                       str_from_unicode(rte->rte_name).constData(),
                       sizeof((*cur_tx_routelist_entry)->rte_ident));